<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<html>
<head>
<title>流程定义基础管理</title>
<script type="text/javascript">
	var $grid, $nodeGrid;
	var selectTableRow;//选中的行数据
	$(function() {
		$grid = $("#grid").datagrid($.extend(datagridOption, {
			url : "${ctx}/bpm/confBase/dataGrid",
			columns : [ [ {
				field : 'ck',
				checkbox : true
			}, {
				field : 'processDefinitionName',
				title : '流程定义名称',
				sortable : true
			}, {
				field : 'processDefinitionId',
				title : '流程定义ID',
				sortable : true
			}, {
				field : 'processDefinitionKey',
				title : '流程定义KEY',
				sortable : true
			}, {
				field : 'processDefinitionVersion',
				title : '流程定义版本',
				sortable : true
			} ] ],
			onClickRow : function(rowIndex, rowData) {
				selectTableRow = rowData;
				$("#cc").layout("panel", "east").panel({
					title : "流程定义【" + rowData.processDefinitionKey + "】节点明细"
				});
				$("#bpmConfBaseId").val(rowData.id);
				$nodeGrid.datagrid("load", {
					"search_EQ_bpmConfBase.id" : rowData.id
				});
			}
		}));
		$nodeGrid = $("#nodeGrid").datagrid($.extend(datagridOption, {
			url : "${ctx}/bpm/confBase/nodeDataGrid",
			columns : [ [ {
				field : 'ck',
				checkbox : true
			}, {
				field : 'code',
				title : '节点代码',
				sortable : true
			}, {
				field : 'name',
				title : '节点名称'
			}, {
				field : 'type',
				title : '节点类型',
				sortable : true
			}, {
				field : 'priority',
				title : '顺序',
				sortable : true
			} ] ],
			onClickRow : function(rowIndex, rowData) {
			}
		}));
		$grid.datagrid('enableFilter');
		$nodeGrid.datagrid('enableFilter');
		$("#search").click(function() {
			$grid.datagrid('load', getSearchConditions("#tt"));
		});
	});
</script>
</head>

<body>
	<div data-options="region:'center',fit:true,border:false">
		<div id="cc" class="easyui-layout" data-options="fit:true" style="width: 480px; height: 440px;">
			<div data-options="region:'center'" style="padding: 1px; witdh: 500px">
				<table id="grid">
				</table>
			</div>
			<div data-options="region:'east', title:'流程节点', split: true, collapsible:true" style="padding: 1px; witdh: 600px">
				<table id="nodeGrid">
				</table>
			</div>
		</div>
	</div>
</body>
</html>
